﻿@using MVC4.Presentation.Models
@{
    Layout = null;
}

<!DOCTYPE html>


<!DOCTYPE html>
<html lang="en"  ng-app >
	<head>
		<meta charset="utf-8" />
		<title>Login Page - Ace Admin</title>

		<meta name="description" content="User login page" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!--basic styles-->

        <link href="~/Content/themes/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
        <link href="~/Content/themes/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" />
        <link href="~/Content/themes/fonts/css/font-awesome.min.css" rel="stylesheet" />


		<!--[if IE 7]>
            <link href="~/Content/themes/fonts/css/font-awesome-ie7.min.css" rel="stylesheet" />
		<![endif]-->

		<!--page specific plugin styles-->

		<!--fonts-->
        <link href="~/Content/themes/ace/ace-login.css" rel="stylesheet" />
        <link href="~/Content/themes/fonts/css/open-sans.css" rel="stylesheet" />

		<!--ace styles-->
        <link href="~/Content/themes/ace/ace-responsive.min.css" rel="stylesheet" />


		<!--[if lt IE 9]>
            <link href="~/Content/themes/ace/ace-ie.min.css" rel="stylesheet" />
		<![endif]-->
	</head>

	<body class="login-layout">
        <style>
 .item,.widget-body{
height:600px;
}
           
.carousel-caption{
background:transparent;
}
 

</style>
		<div class="container-fluid" id="main-container" ng-controller="accountCtrl">
			<div id="main-content">
				<div class="row-fluid">
					<div class="span12">
						<div class="login-container">
							<div class="row-fluid">
								<div class="center">
									<h1>
										<i class="icon-leaf green"></i>
										<span class="red">LMS</span>
										<span class="white">SCORMLMS</span>
									</h1>
									<h4 class="blue">&copy; Company</h4>
								</div>
							</div>

							<div class="space-6"></div>

							<div class="row-fluid">
								<div class="carousel slide"  id="zCarousel">
                                    <div class="carousel-inner">
                                    @Html.Partial("ForgotPassword")

                                     @Html.Partial("login")

                                     @Html.Partial("Register")
									 
								   </div><!--/carousel-inner-->
								</div><!--/carousel-->
							</div>
						</div>
					</div><!--/span-->
				</div><!--/row-->
			</div>
		</div><!--/.fluid-container-->

		<!--basic scripts-->

        <script src="~/Scripts/jquery-1.9.1.min.js"></script>
        <script src="~/Scripts/angular.min.js"></script>
		<!--page specific plugin scripts-->
        <script src="~/Content/themes/bootstrap/js/bootstrap.min.js"></script>
		<!--inline scripts related to this page-->
       
		<script type="text/javascript">
		    function getCookie(c_name)
		    {
		        var c_value = document.cookie;
		        var c_start = c_value.indexOf(" " + c_name + "=");
		        if (c_start == -1)
		        {
		            c_start = c_value.indexOf(c_name + "=");
		        }
		        if (c_start == -1)
		        {
		            c_value = null;
		        }
		        else
		        {
		            c_start = c_value.indexOf("=", c_start) + 1;
		            var c_end = c_value.indexOf(";", c_start);
		            if (c_end == -1)
		            {
		                c_end = c_value.length;
		            }
		            c_value = unescape(c_value.substring(c_start,c_end));
		        }
		        return c_value;
		    }

		    function accountCtrl($scope ) {
		        $scope.loginModel =@Html.Raw(Json.Encode(ViewBag.loginModel ?? new LoginModel() )) ;
		        $scope.registerModel =@Html.Raw(Json.Encode(ViewBag.RegisterModel??new RegisterModel() )) ; 
		        $scope.forgotPasswordModel =@Html.Raw(Json.Encode(ViewBag.forgotPassWordModel??new forgotPassWordModel() )) ;   
		        $scope.activePanel =@Html.Raw(Json.Encode(ViewBag.activePanel??visiblePanel.Login )) ; 
		        if(!$scope.loginModel.UserName){
		            $scope.loginModel.UserName=getCookie('UserName')||""; 
		        } 
		        if(!$scope.loginModel.RememberMe){
		            var rem=getCookie('RememberMe');
		            $scope.loginModel.RememberMe=rem?/true/gi.test(rem)?true:false:false; 
		        } 
		        $scope.loginModel.send=false;
		        $scope.registerModel.send=false;
		        $scope.forgotPasswordModel.send=false;
		        $scope.submit=function(obj,e,formModel,condition){
		            var cond=(typeof(condition)=="undefined")?true:condition;
		            if(obj.$valid&&cond){
		                window[obj.$name].submit();
		            }
		            $scope[formModel].send=true
		            e.preventDefault();
		            e.stopPropagation();
		            return false;
		        }


		    }



		    $(function () {
		        $("#zCarousel").carousel("pause");
		    })

		</script>
	</body>
</html>
